﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace Apply
{
    class BooksFactory
    {
        //private List<Book> books = new List<Book>();
        private ObservableCollection<Book> books = new ObservableCollection<Book>();

        public BooksFactory()
        {
            books.Add(new Book("工厂-标题0", "工厂-出版社0", "工厂-123242432432", "作者1", "作者2"));
            books.Add(new Book("工厂-标题1", "工厂-出版社1", "工厂-123242432432"));
            books.Add(new Book("工厂-标题2", "工厂-出版社2", "工厂-123242432432"));
            books.Add(new Book("工厂-标题3", "工厂-出版社3", "工厂-123242432432"));
            books.Add(new Book("工厂-标题4", "工厂-出版社4", "工厂-123242432432"));
            books.Add(new Book("工厂-标题5", "工厂-出版社5", "工厂-123242432432"));
        }

        public Book GetBook()
        {
            return books[0];
        }

        public IEnumerable<Book> GetBooks()
        {
            return books;
        }
    }
}
